
#include <QDBusConnection>
#include <QDBusError>
#include <QDBusInterface>
#include "../common.h"
#include <QVariant>

int main(int argc, char *argv[])
{

    if (argc == 0) {
        return 1;
    }
	QDBusInterface iter(SERVICE_NAME, "/", "com.tju.qinit.handler");
    QVariant name = argv[1];
    QString arg_str;
    for(int i=2; i<argc; i++)
	{
        arg_str += QString(argv[i]) + " ";
	}
    iter.call("init", name, QVariant(argc-2), arg_str, "");

    return 0;
}
